package com.scheduling.inventory.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 产品库存数据传输对象
 *
 * @author 开发团队
 * @since 2025-05-29
 */
@Data
@Schema(description = "产品库存信息")
public class ProductInventoryDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "库存ID")
    private String inventoryId;

    @Schema(description = "产品ID", required = true)
    @NotBlank(message = "产品ID不能为空")
    private String productId;

    @Schema(description = "在制品数量", required = true)
    @NotNull(message = "在制品数量不能为空")
    @DecimalMin(value = "0", message = "在制品数量不能小于0")
    private BigDecimal wipQuantity;

    @Schema(description = "完成品数量", required = true)
    @NotNull(message = "完成品数量不能为空")
    @DecimalMin(value = "0", message = "完成品数量不能小于0")
    private BigDecimal finishedQuantity;

    // ========== 关联字段 ==========

    @Schema(description = "产品名称")
    private String productName;

    @Schema(description = "产品描述")
    private String productDescription;

    @Schema(description = "总库存数量")
    private BigDecimal totalQuantity;
} 